clear
set more off

use "$statadir/time_series", clear

local lablist ""
forval q = `=tq(2020q2)'/`=tq(2021q4)' {
	local lablist `lablist' `q'
}

format date %tqYYYY!Qq
twoway connected ertc date || ///
    connected ertc_amendment date, lpattern("__") msymbol(square) ///
	legend(order(1 "Dollars on original return" 2 "Dollars on amended returns") cols(1)) ///
	scheme(s1color) ///
	xtitle("Quarter") ytitle("Dollars of ERC (bil)") ///
	xlabel(`lablist') xscale(r(`=tq(2020q2)' `=tq(2021q4)+0.1'))
	
graph export "$outdir/figures/time_series.eps", replace

qui sum ertc
di r(sum)

qui sum ertc_amendment
di r(sum)

qui replace max_ertc = max_ertc/10^6
list
